<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class dangnhap_model extends CI_Model
{
	function __construct()
	{
        parent::__construct();
	}
	
	public function member_info($user)
	{
		$this->db->where('bl_active',1);	
		$this->db->where('username',$user);
		$query = $this->db->get('member');
		return $query->row_array();
	}
	
	public function last_login($member_id)
	{
		$data['dt_login'] = date('Y-m-d H:i:s') ;
		$this->db->where('member_id', $member_id) ;
		$this->db->update('member', $data) ;
	}
}
?>
